'use strict';

module.exports = (app) => {
    const {DataTypes} = app.Sequelize;
    const Home = app.model.define('home', {
        id: { 
            type: DataTypes.UUID,
            defaultValue: app.Sequelize.UUIDV4, 
            primaryKey: true,
            notNull: true,
            comment: 'ID'
        },
        bannerTitle:{type: DataTypes.STRING(50),notNull:true,comment: 'banner'},
        bannerDetail:{type: DataTypes.STRING(100),notNull:true,comment: 'bannerDeteil'},
        bannnerImage:{type: DataTypes.STRING(200),notNull:true,comment: 'bannnerImage'},

        workShowDetail:{type: DataTypes.STRING(100),notNull:true,comment: 'ourServiceIcon1'},

        productImage1:{type: DataTypes.STRING(200),notNull:true,comment: 'bannnerImage'},
        productImage2:{type: DataTypes.STRING(200),notNull:true,comment: 'bannnerImage'},
        productImage3:{type: DataTypes.STRING(200),notNull:true,comment: 'bannnerImage'},



        workShowSubTitle:{type: DataTypes.STRING(10),notNull:true,comment: 'ourServiceText1'},
        workShowSubDetail:{type: DataTypes.STRING(100),notNull:true,comment: 'ourServiceText1'},
        workShowSubImage1:{type: DataTypes.STRING(200),notNull:true,comment: 'ourServiceText1'},
        workShowSubImage2:{type: DataTypes.STRING(200),notNull:true,comment: 'ourServiceText1'},

        address:{type: DataTypes.STRING(100),notNull:true,comment: 'address'},
        
        create_time:{type:DataTypes.DATE(6),defaultValue: app.Sequelize.NOW,notNull: true,comment: '创建时间'},
    },
  );
//   Home.sync()    
  return Home;
};